package com.atguigu.scala_01.chapter_01

object Scala_02 {
  def main(args: Array[String]): Unit = {
    def func(num:Int,result:Long):Long={
      if (num<=1){
        result
      }else{
        func(num-1,result*num)
      }
    }

    println(func(20, 1))
  }

}
